import { Body, Get, Inject, Post } from '@midwayjs/core';
import { CoolController, BaseController, CoolUrlTag, TagTypes } from '@cool-midway/core';
import { GamePackageEntity } from '../../entity/package';
import { PackageService } from '../../service/package';
import { Context } from '@midwayjs/koa';

/**
 * 套餐
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: GamePackageEntity,
  service: PackageService,
  insertParam: ctx => {
    return {
      userId: ctx.user.id,
    };
  },
})

@CoolUrlTag({
  key: TagTypes.IGNORE_TOKEN,
  value: ['list', 'page'],
})

export class AppPackController extends BaseController {
  @Inject()
  packageService: PackageService;

  @Inject()
  ctx: Context;
}
